<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib prefix="s"  uri="/struts-tags"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title>My JSP 'loginPage.jsp' starting page</title>
    
 <script language="JavaScript">
 // 重载验证码

 function reloadVerifyCode(){
     var timenow = new Date().getTime();
     document.getElementById("safecode").src="<%=path%>/code?d="+timenow;
 }
</script>
  </head>
  
  <body>
  <s:form action="Logincheck">
  <div id="loginForm" style="align:center">
  	<ul style="list-style-type:none;">
  		<li>
  			 用户名:<s:textfield name="userVo.userName"  size="20" cssClass="editbox4" maxlength="50"></s:textfield> 
  			 <font color="red" style="font-size: 11px"> <s:property value="%{fieldErrors['userVo.userName'][0]}"/></font>
  		</li>
  		<li>
  			密&nbsp;&nbsp;&nbsp;码: <s:password name="userVo.userPwd" size="20" cssClass="editbox4" maxlength="50"></s:password>
  			<font color="red" style="font-size: 11px"> <s:property value="%{fieldErrors['userVo.userPwd'][0]}"/></font>
  		</li>
  		<li>
  			 验证码:<input class=wenbenkuang name="userCode" id="userCode" type=text value="" maxLength=4 size=10>
  			 <img alt="验证码" id="safecode" width="45"  height="20" border="0" src="<%=path%>/code.action" onclick="javascript:reloadVerifyCode();">
  			  <a href="#" onclick="reloadVerifyCode();" >刷新</a>
  		</li>
  		<li>
  			<input type="button" class="button" onclick="this.disabled=true;this.form.submit();" value="登 陆">
	        <input name="cs" type="button" class="button" id="cs" value="清 空" onclick="this.disabled=true;javascript:location.href='<%=path %>/LogintoCheck';">
  		</li>
  	</ul>
  	
  </div>
 
 </s:form>
  </body>
</html>
